import re

def extract_function_name(code):
    # 使用正则表达式匹配函数名
    match = re.search(r'fn\s+(\w+)\s*\(', code)
    if match:
        return match.group(1)
    return None

# # 示例输入
# code = """
#   let _result = _result.to_array();
#   assert_eq!(_result, [0.0, 2.0, 0.0, 4.0])
# }
# #[test]
# fn test_bitand_m256d_2() {
#   let _result = bitand_m256d(m256d::from_array([0.5, 1.5, 2.5, 3.5]), m256d::from_array([0.0, 0.5, 2.0, 3.0]));
#   let _result = _result.to_array();
#   assert_eq!(_result, [0.0, 0.5, 2.0, 3.0])
# }
# #[test]
# fn test_bitand_m256d_3() {
#   let _result = bitand_m256d(m256d::from_array([5.0, 6.0, 7.0, 8.0]), m256d::from_array([5.0, 5.5, 7.0, 8.0]));
#   let _result = _result.to_array();
#   assert_eq!(_result, [5.0, 5.5, 7.0, 8.0])
# }
# //Function to be tested
# pub fn bitand_m512d(a: m512d, b: m512d) -> m512d {
#   m512d(unsafe { _mm512_and_pd(a.0, b.0) })
# }
# // The Intention of the Rust Function Under Test
# /*The function `bitand_m512d` performs a bitwise AND operation on two 512-bit vectors of double-precision floating-point numbers.*/
# // Input and Output Examples for the Rust Function Under Test
# /*Since the function `bitand_m512d` uses the `m512d` type which is not native to Rust, I will provide inputs and outputs based on assumption that this function is related to SIMD operations.

# /// Inputs and Outputs:
# input_1: (m512d([1.0, 2.0, 3.0, 4.0]), m512d([0.0, 2.0, 0.0, 4.0]))
# output_1: m512d([0.0, 2.0, 0.0, 4.0])

# input_2: (m512d([0.5, 1.5, 2.5, 3.5]), m512d([0.0, 0.5, 2.0, 3.0]))
# output_2: m512d([0.0, 0.5, 2.0, 3.0])

# input_3: (m512d([5.0, 6.0, 7.0, 8.0]), m512d([5.0, 5.5, 7.0, 8.0]))
# output_3: m512d([5.0, 5.5, 7.0, 8.0])*/
# //Test Functions
# #[test]
# fn test_bitand_m512d_1() {
#   let _result = bitand_m512d(m512d::from_array([1.0, 2.0, 3.0, 4.0]), m512d::from_array([0.0, 2.0, 0.0, 4.0]));
#   let _result = _result.to_array();
#   assert_eq!(_result, [0.0, 2.0, 0.0, 4.0])
# }
# """

# # 提取函数名
# function_name = extract_function_name(code)
# print(function_name)  # 输出: test_bitand_m256d_1